import { PropertyReference, LinkToCopilotCloud } from "@/components";

import { Tabs } from "nextra/components";

import { Callout } from "nextra/components";

# GoogleGenerativeAIAdapter

Copilot Runtime adapter for Google Generative AI (e.g. Gemini).
 
## Example
 
```ts
import { CopilotRuntime, GoogleGenerativeAIAdapter } from "@copilotkit/runtime";
const { GoogleGenerativeAI } = require("@google/generative-ai");
 
const genAI = new GoogleGenerativeAI(process.env["GOOGLE_API_KEY"]);
 
const copilotKit = new CopilotRuntime();
 
const model = genAI.getGenerativeModel({
  model: "gemini-pro"
});
 
const serviceAdapter = new GoogleGenerativeAIAdapter({ model });
 
return copilotKit.streamHttpServerResponse(req, res, serviceAdapter);
```

## Constructor Parameters

<PropertyReference name="model" type="GenerativeModel"  > 
A custom Google Generative AI model to use.
</PropertyReference>

